@extends('admin.admin')

@section('content')
        <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        商品管理
        <small>活动专题</small>
        <small>专题分类</small>
        <small>添加</small>
    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> 控制面板</a></li>
        <li ><a href="/admin/activity">活动专题</a></li>
        <li ><a href="/admin/activity_cat?id={{@$activity_id}}">专题分类</a></li>
        <li class="active">修改</li>
    </ol>
</section>

<!-- Main content -->
<section class="content">

    <div class="row">
        <div class="col-xs-12">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title">专题分类添加</h3>
                    <div class="pull-right">
                        <a type="button" class="btn btn-block btn-success btn-xs" onclick="javascript:history.go(-1)"><i class="icon  glyphicon glyphicon glyphicon-menu-left"></i> 返回</a>
                    </div>
                </div>
                <!-- /.box-header -->
                <!-- form start -->
                {!! Form::model($activityCat,['route'=>'admin.activity_cat.store',$activity_id,'class'=>'form-horizontal'])  !!}
                    {!! Form::hidden('back_url',@$_SERVER['HTTP_REFERER']) !!}
                    {!! Form::hidden('activity_id',@$_GET['activity_id']) !!}
                    <div class="box-body">

                        <div class="form-group @if($errors->has('cat_name')) has-error   @endif">
                            <label class="col-sm-2 control-label" for="exampleInputEmail1">名称：</label>
                            <div class="col-sm-6">
                            {!! Form::text('cat_name',old('cat_name'),array('class'=>'form-control','placeholder'=>'请填写专题分类的名称'))!!}
                            </div>
                            <div class="col-sm-8">
                            @if($errors->has('cat_name'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('cat_name')}}</label>
                            @endif
                            </div>
                        </div>

                        <div class="form-group @if($errors->has('cat_description')) has-error   @endif">
                            <label class="col-sm-2 control-label" for="exampleInputEmail1">描述：</label>
                            <div class="col-sm-6">
                            {!! Form::textarea('cat_description',old('cat_description'),array('class'=>'form-control','placeholder'=>'描述'))!!}
                            </div>
                            <div class="col-sm-8">
                            @if($errors->has('cat_description'))
                                <label class="control-label" for="inputError"><i class="fa fa-times-circle-o"></i> {{$errors->first('cat_description')}}</label>
                            @endif
                            </div>
                        </div>
                                                
                    </div>
                    <!-- /.box-body -->
                    <div class="box-footer">
                        <div class="form-group no-padding">
                            <label class="col-sm-2 control-label">&nbsp;</label>
                            <div class="col-sm-3">
                                <button type="submit" class="btn btn-primary">保存</button>
                            </div>
                        </div>
                    </div>
                {!! Form::close()  !!}
            </div>
            <!-- /.box -->
        </div>
    </div>



</section>
<!-- /.content -->
@endsection